<div class="content">
<h1>Danh bạ</h1>
<table id="table" style="font-size: 12px;"> 
	<thead> 
		<tr> 
			<th>Họ</th>
			<th>Tên</th> 
			<th>Phòng</th>
			<th>Chức vụ</th> 			
			<th>Ngày sinh</th> 
			<th>Số điện thoại</th> 
			<th>Địa chỉ</th>
			<th>Email</th>
		</tr> 
	</thead> 
	<tbody> 
	<?php 	
	
	foreach($alluser as $user)
	{
		$hoten = $user->tenthat_nguoidung;
	
		if(!preg_match('/[0-9]+/',$hoten) && !preg_match('/^Bản tin/', $hoten) && !preg_match('/^Phòng/', $hoten))	{
			$ten1 = explode(' ', $hoten);
			$num = count($ten1)-1;
	?>	
		<tr class="gradeX"> 
			<td><?php echo substr($hoten,0,strlen($hoten)-strlen($ten1[$num]));?></td> <!-- ho -->
			<td><?php echo $ten1[$num]?></td> <!-- ten -->
			<td align="center"><?php echo $user->phong_nguoidung?></td><!-- phong -->
			<td align="center"><?php echo $user->chucvu_nguoidung?></td> <!-- chuc vu -->
			<td align="center"><?php echo $user->ngaysinh_nguoidung?></td><!-- ngay sinh -->
			<td align="center"><?php echo $user->sodienthoai_nguoidung?></td> <!-- so dien thoai -->
			<td align="center"><?php echo $user->diachi_nguoidung?></td> <!-- dia chi -->
			<td align="center"><?php echo $user->email_nguoidung?></td> <!-- email -->
		</tr> 
	<?php }
	}?>	 
	</tbody> 
</table>
<div style="clear:both"></div>
</div></div>